#include <iostream>

using namespace std;

int main(void){
	double input[1000];
	int i=0,j=0;
	double k=0,sum=0;
	while(true){
		i++;
		cin>>input[i];
		if(input[i]==0){
			break;
		}

	}

	while(true){
		j++;
		if(j==i)break;

		sum=0;
		k=1.0;
		while(sum<input[j]){
			k=k+1.0;
			sum=sum+1.0/k;

		}
		cout<<int(k-1)<<" card(s)"<<endl;
	}
	return 0;
}